package com.han.hotelplat.service.systemuser.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.han.hotelplat.comm.base.EntityManage;
import com.han.hotelplat.pojo.systemuser.Role;
import com.han.hotelplat.service.systemuser.RoleService;

@Service
public class RoleServiceImpl implements RoleService{
	@Autowired
	private EntityManage entityManage;
	@Override
	public List<Role> findAllRole() {
		return entityManage.findAll("Role");
	}
	@Override
	public Role findRoleById(Integer roleid) {
		return (Role) entityManage.findById(Role.class, roleid);
	}
	@Override
	public void update(Role r) {
		entityManage.update(r);
	}
	@Override
	public void save(Role r) {
		entityManage.save(r);
	}
}
